@extends('web.frame_layout')
<?php $parent_menu = "会员管理"; $menu_selected = "会员节点关系图";?>
<link rel="stylesheet" href="{{asset('web/css/vip-atlas.css')}}">
@section('content')
    <div class="m-right-nr">
        <div>
            <h2><span>{{$menu_selected}}</span></h2>
            <div class="m-vip-tu">
                <form action="{{route('web.node.tree')}}" method="get">
                    <h3 class="sousuo"><input type="text" name="search" placeholder="请输入用户名查询"><button>搜索</button></h3>
                </form>
                <div class="top top1">
                    <h3><a style="color: white" href="{{route('web.node.tree',['uid'=>$user->nid])}}">{{$user->username}}</a></h3>
                    <h4>
                        @if($user->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                            <span>已激活会员</span>
                        @else
                            <span style="color: red">未激活会员</span>
                        @endif
                    </h4>
                    <div>
                        <ul>
                            <li class="color-li">A区业绩</li>
                            <li>{{$user->score->a_count}}</li>
                            <li class="color-li">A区结余</li>
                            <li>{{$user->score->a_over}}</li>
                        </ul>
                    </div>
                    <div>
                        <ul>
                            <li class="color-li">B区业绩</li>
                            <li>{{$user->score->b_count}}</li>
                            <li class="color-li">B区结余</li>
                            <li>{{$user->score->b_over}}</li>
                        </ul>
                    </div>
                    <h5>
                        {{isset(\App\VModels\VVip::vipBySlug($user->vip_slug)->name)?\App\VModels\VVip::vipBySlug($user->vip_slug)->name:''}}
                    </h5>
                    <p></p>
                </div>
                <?php $a = $user->auser(); ?>
                @if(!empty($a))
                <div class="top top2_1">
                    <h3><a style="color: white" href="{{route('web.node.tree',['uid'=>$a->id])}}">{{$a->username}}</a></h3>
                    <h4>
                        @if($a->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                            <span class="green">已激活会员</span>
                        @else
                            <span class="red">未激活会员</span>
                        @endif
                    </h4>
                    <div>
                        <ul>
                            <li class="color-li">A区业绩</li>
                            <li>{{$a->score->a_count}}</li>
                            <li class="color-li">A区结余</li>
                            <li>{{$a->score->a_over}}</li>
                        </ul>
                    </div>
                    <div>
                        <ul>
                            <li class="color-li">B区业绩</li>
                            <li>{{$a->score->b_count}}</li>
                            <li class="color-li">B区结余</li>
                            <li>{{$a->score->b_over}}</li>
                        </ul>
                    </div>
                    <h5>{{isset(\App\VModels\VVip::vipBySlug($a->vip_slug)->name)?\App\VModels\VVip::vipBySlug($a->vip_slug)->name:''}}</h5>
                    <p></p>
                </div>
                   @else
                <div class="top top2_1" style="height:265px;">
                <h3><a style="color: white" target="_blank" href="{{ route('web.reg.page',['uid'=>$user->id]) }}">注册此节点会员(A)</a></h3>
                <p></p>
                </div>
               @endif
                <?php $b = $user->buser(); ?>
                @if(!empty($b))
                <div class="top top2_2">
                    <h3><a style="color: white" href="{{route('web.node.tree',['uid'=>$b->id])}}">{{$b->username}}</a></h3>
                    <h4>
                        @if($b->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                            <span class="green">已激活会员</span>
                        @else
                            <span class="red">未激活会员</span>
                        @endif
                    </h4>
                    <div>
                        <ul>
                            <li class="color-li">A区业绩</li>
                            <li>{{$b->score->a_count}}</li>
                            <li class="color-li">A区结余</li>
                            <li>{{$b->score->a_over}}</li>
                        </ul>
                    </div>
                    <div>
                        <ul>
                            <li class="color-li">B区业绩</li>
                            <li>{{$b->score->b_count}}</li>
                            <li class="color-li">B区结余</li>
                            <li>{{$b->score->b_over}}</li>
                        </ul>
                    </div>
                    <h5>{{isset(\App\VModels\VVip::vipBySlug($b->vip_slug)->name)?\App\VModels\VVip::vipBySlug($b->vip_slug)->name:''}}</h5>
                    <p></p>
                </div>
                @else
                <div class="top top2_2" style="height:265px;">
                    <h3><a style="color: white" target="_blank" href="{{ route('web.reg.page',['uid'=>$user->id]) }}">注册此节点会员(B)</a></h3>
                    <p></p>
                </div>
                @endif
                <p></p>
            </div>
        </div>
    </div>
@endsection
@section('footer')

    <script src="{{asset('web/js/cover-upgrade.js')}}"></script>

@endsection